#ifndef ENTITY_H
#define ENTITY_H

#include <vector>
#include "infoset.h"
#include "serialization.h"

typedef std::vector<InfoSet> TInfoVector;

class Entity
{
	public:
    /* create, destroy, assign */
	Entity(void);

	/* access and update functions */
	InfoSet * i(EInfoId iid);
	InfoSet * addInfoSet(EInfoId iid);
	InfoSet * firstInfoSet();	/* goto first non-empty infoset; NULL if empty list */
	InfoSet * nextInfoSet();	/* goto next non-empty infoset; NULL if not found */
	bool endOfInfoSets();		/* = cannot get next infoset; at last infoset or empty list */

    /* stream functions */
    void toStream(std::ostream& os, unsigned int indent=0, ESerializationType sertype=stFull);
	friend std::ostream& operator<<(std::ostream& os, Entity& e);

	/* infos */
	protected:
	std::vector<TInfoVector> infolist;
	/* infoset iterator variables */
	bool atEnd, atNull;
	unsigned int iter_cid, iter_sid;
};

#endif
